//
//  BridgeTest.m
//  Charles
//
//  Created by Leo on 2019/6/21.
//  Copyright © 2019 charles. All rights reserved.
//

#import "BridgeTest.h"
#import "Bridge.h"
@implementation BridgeTest

+ (void)bridgeTest {
    MonkeyBehavior *monkeyBehavior1 = [[MonkeyBehavior alloc]initWithTitle:@"behavior1"];
    Ape *ape1 = [[Ape alloc]initWithApeBehavior:monkeyBehavior1];
    [ape1 eat];
    [ape1 walk];
    
    NSLog(@"\n");
    
    MonkeyBehavior *monkeyBehavior2 = [[MonkeyBehavior alloc]initWithTitle:@"behavior2"];
    Ape *ape2 = [[Monkey alloc]initWithApeBehavior:monkeyBehavior2];
    [ape2 eat];
    [ape2 walk];
    
    NSLog(@"\n");

    MonkeyBehavior *behavior3 = [[MonkeyBehavior alloc]initWithTitle:@"behavior3"];
    Monkey *monkey = [[Monkey alloc]initWithApeBehavior:behavior3];
    [monkey eat];
    [monkey walk];
    [monkey speak];
}

@end
